package com.example.shop_2211.adapter

import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.base.entity.Menu
import com.example.shop_2211.R
import com.example.shop_2211.utils.GlideUtils

class MenuAdapter:BaseQuickAdapter<Menu,BaseViewHolder>(R.layout.item_menu) {
    override fun convert(holder: BaseViewHolder, item: Menu) {
        //val imageview = holder.getView<ImageView>(R.id.menu_iv)
        GlideUtils.loadImage(context,item.pic,holder.getView(R.id.menu_iv))
        holder.setText(R.id.menu_tv,item.name)
    }
}